<template>
	<view>
		<view class="gcontent">
			<view class="grace-nowrap">
				<view>交通类型</view><view>{{detail.type_trans}}</view>
			</view>
			<view class="grace-nowrap">
				<view>日期</view><view>{{detail.travel_date}}</view>
			</view>
			<view class="grace-nowrap">
				<view>车次/车牌/航班号/场所名称</view><view>{{detail.number}}</view>
			</view>
			<view class="grace-nowrap">
				<view>车厢</view><view>{{detail.number_sub}}</view>
			</view>	
			<view class="grace-nowrap">
				<view>出发站</view><view>{{detail.pos_start}}</view>
			</view>
			<view class="grace-nowrap">
				<view>到达站</view><view>{{detail.pos_end}}</view>
			</view>
			<view class="grace-nowrap">
				<view>车次附加描述</view><view>{{detail.number_info}}</view>
			</view>
			<view class="grace-nowrap">
				<view>开始时间</view><view>{{detail.start_time}}</view>
			</view>
			<view class="grace-nowrap">
				<view>结束时间</view><view>{{detail.end_time}}</view>
			</view>
			<view class="grace-nowrap">
				<view>信息来源</view><view style="color: #008CFF;" @click="goDetail(detail.source)">查看原文</view>
			</view>
			<view class="grace-nowrap">
				<view>线索人</view><view>{{detail.submit_user}}</view>
			</view>
			<view class="grace-nowrap">
				<view>提交时间</view><view>{{detail.create_time}}</view>
			</view>
			<view class="grace-nowrap">
				<view>事件备注</view><view>{{detail.remark}}</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				detail:{},
				id:''
			}
		},
		onLoad(e) {
			this.id = e.id;
			this.getTravelDetail();
		},
		methods: {
			goDetail(url){
				uni.navigateTo({
					url: '/pages/webview/webview?url='+encodeURIComponent(url)
				})
			},
			getTravelDetail(){
				uni.request({
					url: this.serverUrl + '/feiyan/search-api/getTravelDetail',
					header: {
						"content-type": "application/x-www-form-urlencoded; charset=UTF-8"
					},
					data: {
						id: this.id
					},
					method: "POST",
					success: (r) => {
						// console.log(r);
						if (r.data.code == '000000') {
							this.detail = r.data.data[0];
						} else {
							uni.showToast({
								title: r.data.message
							});
						}
					}
				})
			}
		}
	}
</script>

<style>
.gcontent{
	margin:20px 3%;
	border-left: 1px solid #909399;
	border-top: 1px solid #909399;
}
.grace-nowrap view{
	width: 50%;
	font-size: 30rpx;
	line-height: 60rpx;
	padding: 5rpx;
	word-wrap: break-word;
	border-right: 1px solid #909399;
	border-bottom: 1px solid #909399;
}
</style>
